class Solution {
public:
    int twoEggDrop(int n) {
        int ret = 1;
        for(int i = 1; n > 0; i++)
        {
            n -= i;
            ret++;
        }
        return ret-1;
    }
};